package com.ruoyi.system.service.backend.impl;

import com.ruoyi.system.controller.CxBase;
import com.ruoyi.system.domain.SafetyPublicityInfo;
import com.ruoyi.system.domain.front.PublicitySelect;
import com.ruoyi.system.domain.front.PublicityType;
import com.ruoyi.system.mapper.front.SafetyPublicFrontMapper;
import com.ruoyi.system.service.backend.ISafetyPublicBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SafetyPublicBackServiceImpl extends CxBase implements ISafetyPublicBackService {
    @Autowired
    private SafetyPublicFrontMapper safetyPublicFrontMapper;
    /**
     * 查询安全宣传列表
     *
     * @param publicitySelect 安全宣传查询条件
     * @return 安全宣传列表
     */
    public List<SafetyPublicityInfo> selectpublictime(PublicitySelect publicitySelect){
        startPage();
        List<SafetyPublicityInfo> safetyPublicityInfos = safetyPublicFrontMapper.selectpublictime(publicitySelect);
        for(SafetyPublicityInfo safetyPublicityInfo : safetyPublicityInfos){
            safetyPublicityInfo.setSetDate(StampToString(Long.valueOf(safetyPublicityInfo.getSetDate())));
        }
        return safetyPublicFrontMapper.selectpublictime(publicitySelect);
    }
    /**
     * 查询安全宣传详细信息列表
     *
     * @param safetyPublicityInfo 安全宣传详细信息
     * @return 安全宣传详细信息集合
     */
    public List<SafetyPublicityInfo> selectSafetyPublicityInfoDetailed(SafetyPublicityInfo safetyPublicityInfo)
    {
        return safetyPublicFrontMapper.selectSafetyPublicityInfoDetailed(safetyPublicityInfo);
    }

    /**
     * 查询安全宣传详细信息列表
     *
     * @return 安全宣传详细信息集合
     */
    public List<PublicityType> selectpublicitytype()
    {
        return safetyPublicFrontMapper.selectpublicitytype();
    }

}
